from django.urls import path
from rest_framework import routers
from .views import *

urlpatterns = [
    # 加载所有的优惠券类型
    path('types/', CouponTypeList.as_view()),
]
router = routers.DefaultRouter()

# 优惠券视图集
router.register("coupons", CouponsViewSet)
# 优
# router.register("types", CouponsViewSet)

urlpatterns += router.urls